package bocchi.card;

import bocchi.base.BaseCustomCard;
import bocchi.power.AnxietyPower;
import bocchi.stance.DelusionStance;
import com.megacrit.cardcrawl.actions.common.HealAction;
import com.megacrit.cardcrawl.actions.common.RemoveSpecificPowerAction;
import com.megacrit.cardcrawl.actions.watcher.ChangeStanceAction;
import com.megacrit.cardcrawl.characters.AbstractPlayer;
import com.megacrit.cardcrawl.monsters.AbstractMonster;
import com.megacrit.cardcrawl.powers.AbstractPower;

public class ChickenNuget extends BaseCustomCard {
    private static final String RAW_ID = ChickenNuget.class.getSimpleName();
    public static final String GAME_ID = RAW_ID;

    public ChickenNuget() {
        super(RAW_ID);
    }

    @Override
    public void use(AbstractPlayer player, AbstractMonster monster) {
        AbstractPower anxiety = player.getPower(AnxietyPower.GAME_ID);
        if (anxiety != null) {
            addToBot(new HealAction(player, player, anxiety.amount));
            addToBot(new RemoveSpecificPowerAction(player, player, AnxietyPower.GAME_ID));
        }

        if (player.stance.ID.equals(DelusionStance.GAME_ID)) {
            addToBot(new ChangeStanceAction("Neutral"));
        }
    }
}
